{extend name="layout/layout"}
{block name="content"}
<main class="user_page  ">
    <section class="">
        <div class="layui-main">
            <div class="user_con">
                <div class="user_headpage" >
                    {include file="user_activity/page_menu" menu='user_ticket' id="$id" /}
                </div>
                <div class="right_main ">
                    <p class="ft24 mb10 ft-bold">售票資訊</p>
                    <p class="ft14 gary_c9 mb20 ft-bold">{$ticket.sale_begin} - {$ticket.sale_end}</p>
                    <div class="block_com">
                       <p class="gary_c9 ft14 mb30">10 分鐘更新一次</p>
                       <ul class="layui-row layui-col-space20 ul_height ut_ul1">
                          <li class="layui-col-md4 layui-col-xs4">
                             <div class="item">
                                <p class="t1">剩餘總張數</p>
                                <p class="t2">{$act.remain_ticket|default=0}</p>
                             </div>
                          </li>
                          <li class="layui-col-md4 layui-col-xs4">
                             <div class="item">
                                <p class="t1">報名成功</p>
                                <p class="t2">{$success_tickets|default=0}</p>
                             </div>
                          </li>
                          <li class="layui-col-md4 layui-col-xs4">
                             <div class="item">
                                <p class="t1">票券收入</p>
                                <p class="t2">{$success_ticket_amount|default=0}</p>
                                <p class="tac ">實際金額以結算為主，尚未計算訂單或其他優惠</p>
                             </div>
                          </li>
                       </ul>
                    </div>
                    <div class="block_com mt20">
                       <div class="ticket_ul2 ut_table">
                          <table class="layui-table" lay-skin="nob">
  
                             <thead>
                                <tr>
                                   <th>票券名稱</th>
                                   <th>狀態</th>
                                   <th>報名成功/總數</th>
                                   <th>售價</th>
                                   <th>小計</th>
                                </tr>
                             </thead>
                             <tbody>
                                {volist name="ticket_detail" id="vo"} 
                                 <tr>
                                    <td>{$vo.name}</td>
                                    <td class="flex-center">
                                       <div class="label_ut1" status="{$vo.sale_status}">
                                          {if $vo.sale_status == 2} 
                                          已结束 
                                          {elseif $vo.sale_status ==3 /}
                                          已售完
                                          {elseif $vo.sale_status ==4 /}
                                          未开售
                                          {else /} 
                                          售卖中 
                                          {/if}
                                       </div>
                                    </td>
                                    <td>{$vo.orders_count}/{$vo.quantity}</td>
                                    <td>￥{$vo.price}</td>
                                    <td>￥{$vo.orders_sum|default=0}</td>
                                 </tr>
                                {/volist}

                                {volist name="ticket_group" id="vo"} 
                                 <tr>
                                    <td>{$vo.group_name}</td>
                                    <td class="flex-center">
                                       <div class="label_ut1" status="{$vo.sale_status}">
                                          {if $vo.sale_status == 2} 
                                          已结束 
                                          {elseif $vo.sale_status ==3 /}
                                          已售完
                                          {elseif $vo.sale_status ==4 /}
                                          未开售
                                          {else /} 
                                          售卖中 
                                          {/if}
                                       </div>
                                    </td>
                                    <td>{$vo.orders_count}/{$vo.group_number}</td>
                                    <td>￥{$vo.group_price}</td>
                                    <td>￥{$vo.orders_sum|default=0}</td>
                                 </tr>
                                {/volist}
                                
                                <!-- <tr>
                                   <td>胜多负少的</td>
                                   <td class="flex-center">
                                      <div class="label_ut1" status="1">审核中</div>
                                   </td>
                                   <td>0/0</td>
                                   <td>￥10</td>
                                   <td>￥10</td>
                                </tr> -->
                             </tbody>
                          </table>
                       </div>
                    </div>
                 </div>
            </div>
        </div>
    </section>
</main>
<script>
   $(document).ready(function() {
    setInterval(function() {
        location.reload(); // 刷新页面
      }, 10 * 60 * 1000); // 10 分钟（以毫秒为单位）
   });
</script>

{/block}